ABS block
Short summary
Name |
|
→POU type |
|
Category |
|
Conform to →IEC-standard |
no restrictions |
Graphical interface |
|
Available since |
|
Functionality
The mathematical function Abs is called: The block returns the absolute value (i.e. without sign) of the value connected to the input value.
Special case: If the input gets a negative value that matches the lower limit of the data type, the block returns this negative value. Reason: There is no corresponding positive value for the lower limit (= the most negative value). Furthermore, the output ENO
is set to value FALSE
.
See under "Example for usage within ST-editor": If the most negative SINT
value -128
is connected to the input, the blocks returns the value -128
(the most positive SINT
value is 127
) and ENO=FALSE
.
Inputs, return value
|
Identifier |
Description |
|
---|---|---|---|
Inputs: |
|
|
value |
Return value: |
– |
|
|
Input EN
and output ENO
are available when →calling the block. See "Execution control: EN, ENO" for information on input EN
and output ENO
.
See:
-
"Blocks for safe logic" whether this block is supported for developing safety-relevant applications.
-
"Highlighting safe logic in the FBD-editor" for the effects when using the block as a block for safe logic.
Internal error diagnostic for block
The block checks the return value. If the return value is a negative value that matches the lower limit of the data type, the output ENO
of the block is set to value FALSE
(or an equivalent).
Example for usage within ST-editor
|
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.